<include file="application/walletyhbbadmin/view/public/left.html"/>
<div id="dcMain">
   <!-- 当前位置 -->
<div id="urHere">用户地址<b>></b><strong>修改用户地址</strong> </div>   <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <h3><a href="{:U('Wuliu/yonghudizhi')}" class="actionBtn">浏览物流</a>物流管理</h3>
    <form action="{:U('Wuliu/updateYonghu')}" method="post" enctype="multipart/form-data">
        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <tr>
                <td width="90" align="right">收货人：</td>
        <td>
        <input type="text" id="title" name="consignee" value="{$info.consignee}" size="80" class="inpMain" />
         <input  name="address_id"  value="{$info.address_id}" type="hidden">
       </td>
       </td>
      </tr>
         <tr>
             <td width="90" align="right">邮箱地址：</td>
             <td>
                 <input type="text" id="title" name="email" value="{$info.email}" size="80" class="inpMain" />
                 <input  name="address_id"  value="{$info.address_id}" type="hidden"></td>
             </td>
         </tr>
            <tr>
                <td width="90" align="right">国家：</td>
                <td>
                    <input type="text" id="title" name="country" value="{$info.country}" size="80" class="inpMain" />
                    <input  name="address_id"  value="{$info.address_id}" type="hidden"></td>
                </td>
            </tr>
            <tr>
                <td width="90" align="right">地区：</td>
                <td>
                    <div class="form-group">
                        <select name="province" id="department_arr_1">
                            <option value="-1"  >省份</option>
                            <volist name="sheng" id="yy" >
                                <option value="{$yy.id}" <if condition="$info.province eq $yy.id ">selected</if> >{$yy.name}</option>
                            </volist>
                        </select>
                        <select name="city" id="department_arr_2" >
                            <option value="-1">市/县</option>
                            <volist name="shi" id="yy" >
                                <option  value="{$yy.id}" <if condition="$info.city eq $yy.id ">selected</if> >{$yy.name}</option>
                            </volist>
                        </select>
                        <select name="district" id="department_arr_3">
                            <option value="-1">镇/区</option>
                            <volist name="qu" id="yy" >
                                <option value="{$yy.id}" <if condition="$info.district eq $yy.id ">selected</if> >{$yy.name}</option>
                            </volist>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <td width="90" align="right">地址：</td>
                <td>
                    <textarea type="textarea" id="title" name="address"  id="title" value="{$info.address}" style="width:40.5%" class="inpMain">{$info.address}</textarea>
                </td>
            </tr>
            <tr>
                <td width="90" align="right">邮政编码：</td>
                <td>
                    <input type="text" id="title" name="zipcode" value="{$info.zipcode}" size="80" class="inpMain" />
                    <input  name="address_id"  value="{$info.address_id}" type="hidden"></td>
                </td>
            </tr>
            <tr>
                <td width="90" align="right">手机：</td>
                <td>
                    <input type="text" id="title" name="mobile" value="{$info.mobile}" size="80" class="inpMain" />
                    <input  name="address_id"  value="{$info.address_id}" type="hidden"></td>
                </td>
            </tr>
      <tr>
        <td width="90" align="right">显示：</td>
        <td>
          <input type="radio" value="1" name="enabled" id="0" <if condition= "$info.enabled eq 1">checked="checked"</if>/>是
      <input type="radio" value="0" name="enabled" id="1"  <if condition= "$info.enabled eq 0">checked="checked"</if>/>否
        </td>
      </tr>

      <tr>
       <td>
        <input name="submit" class="btn" type="submit" value="提交" />
       </td>
      </tr>
     </table>
    </form>
       </div>
 </div>
 <div class="clear"></div>
<include file="application/walletyhbbadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div> </div>
<script type="text/javascript">
    onload = function()
    {
        document.forms['action'].reset();
    }

    function douAction()
    {
        var frm = document.forms['action'];
        frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
    }
</script>
<script type="text/javascript">
    $('#department_arr_1').change(function(){
        var id = $(this).val();
        if(id!==-1){
            $.post("{:U('Wuliu/getLevel')}",{id:id},function(data){
                // console.log(data.data);
                $('#department_arr_2').empty();   //清除后续下拉单
                $('#department_arr_3').empty();
                var html = '<option value="-1">请选择</option>';
                $('#department_arr_3').html(html);   // 插入请选择选项
                $('#department_arr_4').html(html);
                if(data.status==1){
                    var list = data.data;

                    for(var i=0; i<list.length; i++){
                        html += '<option value="'+list[i]['id']+'">'+list[i]['name']+'</option>';
                    }
                }
                $('#department_arr_2').html(html);
            })
        }
    })
    $('#department_arr_2').change(function(){
        var id = $(this).val();
        if(id!==-1){
            $.post("{:U('Wuliu/getLevel')}",{id:id},function(data){
                // console.log(data.data);
                $('#department_arr_3').empty();   //清除后续下拉单
                var html = '<option value="-1">请选择</option>';
                $('#department_arr_4').html(html);   // 插入请选择选项
                if(data.status==1){
                    var list = data.data;

                    for(var i=0; i<list.length; i++){
                        html += '<option value="'+list[i]['id']+'">'+list[i]['name']+'</option>';
                    }
                }
                $('#department_arr_3').html(html);
            })
        }
    })
</script>
</body>
</html>